package com.tiku.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;


/**
 * 用户
 *
 * @author hc  13264494458
 * @date 2023/10/12
 */
@Schema(description = "用户")
@Getter
@Setter
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_user")
public class User implements Serializable {
    @Serial
    private static final long serialVersionUID = 3912585380240444988L;
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "编号")
    private Long id;

    /**
     * 昵称
     */
    @TableField(value = "nickname")
    @Schema(description = "昵称")
    private String nickname;

    /**
     * 真实姓名
     */
    @TableField(value = "`name`")
    @Schema(description = "真实姓名")
    private String name;

    /**
     * 身份证号
     */
    @TableField(value = "idcard")
    @Schema(description = "身份证号")
    private String idcard;

    /**
     * 头像
     */
    @TableField(value = "avatar")
    @Schema(description = "头像")
    private String avatar;

    /**
     * 性别 1男 2女 3未知
     */
    @TableField(value = "gender")
    @Schema(description = "性别 1男 2女 3未知")
    private Byte gender;

    /**
     * 生日
     */
    @TableField(value = "birth")
    @Schema(description = "生日")
    private Date birth;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    @Schema(description = "邮箱")
    private String email;

    /**
     * 电话
     */
    @TableField(value = "tel")
    @Schema(description = "电话")
    private String tel;

    /**
     * 账户
     */
    @TableField(value = "account")
    @Schema(description = "账户")
    private String account;

    /**
     * 密码
     */
    @TableField(value = "`password`")
    @Schema(description = "密码")
    private String password;

    /**
     * 盐值
     */
    @TableField(value = "salt")
    @Schema(description = "盐值")
    private String salt;

    /**
     * 学分
     */
    @TableField(value = "credit")
    @Schema(description = "学分")
    private Integer credit;

    /**
     * 显示优先级
     */
    @TableField(value = "priority")
    @Schema(description = "显示优先级")
    private Integer priority;

    /**
     * 实名认证时间
     */
    @TableField(value = "verify_time")
    @Schema(description = "实名认证时间")
    private LocalDateTime verifyTime;

    /**
     * 最后一次登录IP
     */
    @TableField(value = "login_ip")
    @Schema(description = "最后一次登录IP")
    private String loginIp;

    /**
     * 最后一次登录时间
     */
    @TableField(value = "login_time")
    @Schema(description = "最后一次登录时间")
    private LocalDateTime loginTime;

    /**
     * 简介
     */
    @TableField(value = "info")
    @Schema(description = "简介")
    private String info;

    /**
     * 状态:  0删除状态  激活状态1   实名认证状态2  功能受限3
     */
    @TableField(value = "`state`")
    @Schema(description = "状态:  0删除状态  激活状态1   实名认证状态2  功能受限3")
    private Integer state;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}